# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Xray-core is a superset of v2ray-core"

HOMEPAGE="https://github.com/XTLS/Xray-core"

SRC_URI="https://github.com/XTLS/Xray-core/releases/download/v${PV}/Xray-linux-64.zip -> ${PF}.zip"

RESTRICT="binchecks bindist mirror strip"

LICENSE="MPL2.0"
SLOT="0"
KEYWORDS="amd64"
S=${WORKDIR}

RDEPEND=""
DEPEND="${RDEPEND}"

src_unpack() {
	unpack ${P}.zip
}

src_install() {
	cd ${D} || die
	mkdir -p ${D}/usr/bin || die
	mv ${S}/xray ${D}/usr/bin || die
}
